import request from '@/utils/request'

// 获取员工列表
export function getEmployee(params) {
  return request({
    url: '/users',
    params
  })
}

// 获取员工数量
export function getEmployeeCount() {
  return request({
    url: '/users/count'
  })
}

// 获取指定员工
export function employeeDetails(id) {
  return request({
    url: `/users/${id}`
  })
}

// 编辑员工
export function updateEmployee(data) {
  return request({
    url: `/users/${data.id}`,
    method: 'put',
    data
  })
}

// 删除员工
export function deleteEmployee(id) {
  return request({
    url: `/users/${id}`,
    method: 'delete'
  })
}
